package com.dhkj.circle.thread;

import com.dhkj.circle.broadcast.TimeEvent;

import org.greenrobot.eventbus.EventBus;

import static java.lang.Thread.sleep;

public class TimeThread implements Runnable {

    @Override
    public void run() {
        while (true) {
            try {
                EventBus.getDefault().post(new TimeEvent());
                sleep(1000);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}
